var Log = require('../framework/log');
function RequestPlayHandler(session,msg){
    var player = session.getPlayer();
    var battleId = player.battleId;
    var battle = app.getBattleService().getBattle(battleId);
    //Battle.prototype.requestPlay = function(playerId,round,cards_index,isguard)
    battle.requestPlay(player.id,battle.battleRecord.round,msg.cards,msg.isguard);
    Log.debug("RequestPlayHandler OK,player = %s,battleId = %s",player.id,battleId);
}

module.exports = RequestPlayHandler;